home *** CD-ROM | disk | FTP | other *** search
- 15
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- FindApp
- --- RECORDSEPARATOR ---
- Platform:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Windows and Macintosh
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Description:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- baFindApp finds an application.
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Usage:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Result = baFindApp( Type )
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Arguments:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- String.
- --- RECORDSEPARATOR ---
- Type is the extension of the file type on Windows or the Creator type on Macintosh.
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Returns:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- String.
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Windows
- --- RECORDSEPARATOR ---
- - returns the full path name to the application. Returns an empty string if
- --- RECORDSEPARATOR ---
- the extension is not associated with or a program, or the associated program does
- --- RECORDSEPARATOR ---
- not exist.
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Macintosh
- --- RECORDSEPARATOR ---
- - returns the full path name to the application. Returns an empty string if
- --- RECORDSEPARATOR ---
- the application is not installed.
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Examples:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Director:
- --- RECORDSEPARATOR ---
- set Notepad = baFindApp( "txt" )
- --- RECORDSEPARATOR ---
- set SimpleText = baFindApp( "ttxt" )
- --- RECORDSEPARATOR ---
- Authorware:
- --- RECORDSEPARATOR ---
- Acrobat := baFindApp( "pdf" )
- --- RECORDSEPARATOR ---
- Acrobat := baFindApp( "CARO" )
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Notes:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- In 32bit Windows, Microsoft guidelines state that if a program registers a file
- --- RECORDSEPARATOR ---
- extension, and the path to the executable file is a long file name, then that name
- --- RECORDSEPARATOR ---
- must be included in quotes. If an installation program doesn't follow these
- --- RECORDSEPARATOR ---
- guidelines, then this function may fail. Specifically, if the path name to the
- --- RECORDSEPARATOR ---
- executable contains a space, then this function will not be able to return the path to
- --- RECORDSEPARATOR ---
- the executable. Adobe Acrobat Reader 3 is one program that does not register
- --- RECORDSEPARATOR ---
- itself correctly - it does not place quotes around the executable name in the
- --- RECORDSEPARATOR ---
- registry. The baFindApp function has been written around this particular problem
- --- RECORDSEPARATOR ---
- with Acrobat, and will use other methods to locate Acrobat if it is asked to find the
- --- RECORDSEPARATOR ---
- app associated with "pdf" files.
- --- RECORDSEPARATOR ---
- Each application on the Mac has itΓÇÖs own unique four character identifier eg,
- --- RECORDSEPARATOR ---
- ΓÇ£CAROΓÇ¥ for Acrobat, ΓÇ£MOSSΓÇ¥ for Netscape, ΓÇ£MSIEΓÇ¥ for Internet Explorer. There are
- --- RECORDSEPARATOR ---
- a number of shareware utilities available which will tell you the creator type of a
- --- RECORDSEPARATOR ---
- application, such as File Buddy by Laurence Harris. You can also use AppleΓÇÖs
- --- RECORDSEPARATOR ---
- ResEdit.
- --- RECORDSEPARATOR ---
- Under OSX, you can also use extensions to find an application. For example,
- --- RECORDSEPARATOR ---
- baFindApp( ".txt" ) will return the application that will open .txt files that don't have a
- --- RECORDSEPARATOR ---
- file type/creator. You must use a . at the beginning of the extension.
- --- RECORDSEPARATOR ---
- Under OSX, if the application to be found is inside a bundle, then the name that is
- --- RECORDSEPARATOR ---
- returned is the name to the bundle. You can tell if a bundle has been returned
- --- RECORDSEPARATOR ---
- because it will end in a :
- --- RECORDSEPARATOR ---
- For example, baFindApp( ".txt" ) may return
- --- RECORDSEPARATOR ---
- "OSX:Applications:TextEdit.app:"
- --- RECORDSEPARATOR ---
- You can pass this name into other functions, eg baOpenFile.